using UnityEngine;
namespace HBFramework
{
    public class Box2DCollider : BaseCollider
    {
        public float width = 1;
        public float height = 1;

        public Box2DCollider(float width, float height)
        {
            this.width = width;
            this.height = height;
        }

        public override bool OverlapPoint(Vector3 point)
        {
            if (point.x < transform.position.x - width / 2) return false;
            if (point.y < transform.position.y - height / 2) return false;
            if (point.x > transform.position.x + width / 2) return false;
            if (point.y > transform.position.y + height / 2) return false;
            return true;
        }
    }
}